\section{src/process/elf\-Process/elf\-Process.c \-File \-Reference}
\label{elf_process_8c}\index{src/process/elf\-Process/elf\-Process.\-c@{src/process/elf\-Process/elf\-Process.\-c}}
{\ttfamily \#include \char`\"{}elf\-Process.\-h\char`\"{}}\*
{\ttfamily \#include $<$libelf.\-h$>$}\*
{\ttfamily \#include $<$err.\-h$>$}\*
{\ttfamily \#include $<$fcntl.\-h$>$}\*
{\ttfamily \#include $<$stdio.\-h$>$}\*
{\ttfamily \#include $<$stdlib.\-h$>$}\*
{\ttfamily \#include $<$unistd.\-h$>$}\*
{\ttfamily \#include $<$assert.\-h$>$}\*
\-Include dependency graph for elf\-Process.\-c\-:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{elf_process_8c__incl}
\end{center}
\end{figure}
\subsection*{\-Defines}
\begin{DoxyCompactItemize}
\item 
\#define {\bf \-P\-R\-I\-N\-T\-\_\-\-F\-M\-T}~\char`\"{}\%-\/20s 0x\%jx$\backslash$n\char`\"{}
\begin{DoxyCompactList}\small\item\em \-Sets the output format screen attributes \-E\-L\-F header. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Functions}
\begin{DoxyCompactItemize}
\item 
void {\bf \-Reading\-E\-L\-F\-Executable\-Header} (\-Elf $\ast$e, int {\bf fd})
\begin{DoxyCompactList}\small\item\em \-Displays the \-E\-L\-F file characteristics established in its header. \end{DoxyCompactList}\item 
char {\bf raw\-Print} (int {\bf fd})
\begin{DoxyCompactList}\small\item\em \-Print of display file content on hex. \end{DoxyCompactList}\item 
char {\bf validate\-Elf} (\-Elf $\ast$$\ast$source, int {\bf fd}, size\-\_\-t $\ast$shstrndx)
\begin{DoxyCompactList}\small\item\em \-Validate if the input file is an elf object. \end{DoxyCompactList}\item 
void {\bf print\-\_\-symbols} (\-Elf $\ast$elf, \-Elf\-\_\-\-Scn $\ast$scn, \-G\-Elf\-\_\-\-Shdr $\ast$shdr)
\begin{DoxyCompactList}\small\item\em \-Prints section data. \end{DoxyCompactList}\item 
char {\bf print\-Headers} (int {\bf fd})
\begin{DoxyCompactList}\small\item\em \-Prints on display the \-E\-L\-F headers of the input file. \end{DoxyCompactList}\item 
char {\bf process\-Headers} (int {\bf fd})
\begin{DoxyCompactList}\small\item\em \-Process \-E\-L\-F headers of the input file. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{\-Define \-Documentation}
\index{elf\-Process.\-c@{elf\-Process.\-c}!\-P\-R\-I\-N\-T\-\_\-\-F\-M\-T@{\-P\-R\-I\-N\-T\-\_\-\-F\-M\-T}}
\index{\-P\-R\-I\-N\-T\-\_\-\-F\-M\-T@{\-P\-R\-I\-N\-T\-\_\-\-F\-M\-T}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{\-P\-R\-I\-N\-T\-\_\-\-F\-M\-T}]{\setlength{\rightskip}{0pt plus 5cm}\#define {\bf \-P\-R\-I\-N\-T\-\_\-\-F\-M\-T}~\char`\"{}\%-\/20s 0x\%jx$\backslash$n\char`\"{}}\label{elf_process_8c_aa669cc9790fbafeb364cbe10641c172d}


\-Sets the output format screen attributes \-E\-L\-F header. 



\-Definition at line 22 of file elf\-Process.\-c.



\subsection{\-Function \-Documentation}
\index{elf\-Process.\-c@{elf\-Process.\-c}!print\-\_\-symbols@{print\-\_\-symbols}}
\index{print\-\_\-symbols@{print\-\_\-symbols}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{print\-\_\-symbols}]{\setlength{\rightskip}{0pt plus 5cm}{\bf print\-\_\-symbols} (
\begin{DoxyParamCaption}
\item[{\-Elf $\ast$}]{elf, }
\item[{\-Elf\-\_\-\-Scn $\ast$}]{scn, }
\item[{\-G\-Elf\-\_\-\-Shdr $\ast$}]{shdr}
\end{DoxyParamCaption}
)}\label{elf_process_8c_adaf709c5598ed900ab21942a1e55dc32}


\-Prints section data. 


\begin{DoxyParams}{\-Parameters}
{\em elf} & \-Object elf \\
\hline
{\em scn} & \-Section content \\
\hline
{\em shdr} & \-E\-L\-F \-Section \-Header \-Table \\
\hline
\end{DoxyParams}


\-Definition at line 98 of file elf\-Process.\-c.

\index{elf\-Process.\-c@{elf\-Process.\-c}!print\-Headers@{print\-Headers}}
\index{print\-Headers@{print\-Headers}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{print\-Headers}]{\setlength{\rightskip}{0pt plus 5cm}{\bf print\-Headers} (
\begin{DoxyParamCaption}
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{elf_process_8c_afc812de68f9f038283aacfdeead056d1}


\-Prints on display the \-E\-L\-F headers of the input file. 


\begin{DoxyParams}{\-Parameters}
{\em fd} & pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 136 of file elf\-Process.\-c.

\index{elf\-Process.\-c@{elf\-Process.\-c}!process\-Headers@{process\-Headers}}
\index{process\-Headers@{process\-Headers}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{process\-Headers}]{\setlength{\rightskip}{0pt plus 5cm}{\bf process\-Headers} (
\begin{DoxyParamCaption}
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{elf_process_8c_a322e41fb93d676b56ecc10f3ca833054}


\-Process \-E\-L\-F headers of the input file. 


\begin{DoxyParams}{\-Parameters}
{\em fd} & pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 173 of file elf\-Process.\-c.

\index{elf\-Process.\-c@{elf\-Process.\-c}!raw\-Print@{raw\-Print}}
\index{raw\-Print@{raw\-Print}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{raw\-Print}]{\setlength{\rightskip}{0pt plus 5cm}{\bf raw\-Print} (
\begin{DoxyParamCaption}
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{elf_process_8c_af621c30c7fe80118c18f9bb317f0b95a}


\-Print of display file content on hex. 


\begin{DoxyParams}{\-Parameters}
{\em fd} & pointer to the file to be process \\
\hline
\end{DoxyParams}


\-Definition at line 30 of file elf\-Process.\-c.

\index{elf\-Process.\-c@{elf\-Process.\-c}!\-Reading\-E\-L\-F\-Executable\-Header@{\-Reading\-E\-L\-F\-Executable\-Header}}
\index{\-Reading\-E\-L\-F\-Executable\-Header@{\-Reading\-E\-L\-F\-Executable\-Header}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{\-Reading\-E\-L\-F\-Executable\-Header}]{\setlength{\rightskip}{0pt plus 5cm}void {\bf \-Reading\-E\-L\-F\-Executable\-Header} (
\begin{DoxyParamCaption}
\item[{\-Elf $\ast$}]{e, }
\item[{int}]{fd}
\end{DoxyParamCaption}
)}\label{elf_process_8c_a349bf83f64825eff7c81cd30ce65bdca}


\-Displays the \-E\-L\-F file characteristics established in its header. 


\begin{DoxyParams}{\-Parameters}
{\em e} & \-E\-L\-F object containing the header information \\
\hline
{\em fd} & pointer to the input file \\
\hline
\end{DoxyParams}


\-Definition at line 203 of file elf\-Process.\-c.

\index{elf\-Process.\-c@{elf\-Process.\-c}!validate\-Elf@{validate\-Elf}}
\index{validate\-Elf@{validate\-Elf}!elfProcess.c@{elf\-Process.\-c}}
\subsubsection[{validate\-Elf}]{\setlength{\rightskip}{0pt plus 5cm}{\bf validate\-Elf} (
\begin{DoxyParamCaption}
\item[{\-Elf $\ast$$\ast$}]{source, }
\item[{int}]{fd, }
\item[{size\-\_\-t $\ast$}]{shstrndx}
\end{DoxyParamCaption}
)}\label{elf_process_8c_a309cc9f8f31dc406fbd4f950f14c9e85}


\-Validate if the input file is an elf object. 


\begin{DoxyParams}{\-Parameters}
{\em source} & \-Output parameter that contains the elf object to work with \\
\hline
{\em fd} & \-Pointer to the input file \\
\hline
{\em shstrndx} & \-Number of section on the file \\
\hline
\end{DoxyParams}


\-Definition at line 58 of file elf\-Process.\-c.

